import React,{Component} from 'react';
import {Platform, StyleSheet,ScrollView,Text, View,TouchableOpacity, Alert,Image } from 'react-native';

export default class attendance extends Component{
    static navigationOptions = {
        headerStyle:{
            backgroundColor:'#d04542',
            height:50,
        },
        headerTintColor:'white',
    };
	render(){
		const { navigation } = this.props;
		return(
		    <ScrollView style={styles.ScrollView}>
		        <View style={styles.box}>
			        <View style={styles.modular}>
			       		<TouchableOpacity style={styles.modularLeft}
			       			onPress={()=>{ 
								navigation.navigate("hospitalization")
							}}
			       		>
			        		<View style={styles.icon}>
			        			<Image style={styles.iconImages} resizeMode={'contain'} source={require('../img/partner/mdpi.png')}></Image>
			        		</View>
			        		<Text style={styles.modularLeftText}>住院登记</Text>
			        	</TouchableOpacity>
			        	<TouchableOpacity style={styles.modularRight}>
			        		<View style={styles.icon}>
			        			<Image style={styles.iconImages} resizeMode={'contain'} source={require('../img/partner/Hospital.png')}></Image>
			        		</View>
			        		<Text style={styles.modularLeftText}>附近医院</Text>
			        	</TouchableOpacity>
			        </View>
			        <View style={styles.modular}>
			       		<TouchableOpacity style={styles.modularLeft}
			       			onPress={()=>{ 
								navigation.navigate("consultDoctor")
							}}
			       		>
			        		<View style={styles.icon}>
			        			<Image style={styles.iconImages} resizeMode={'contain'} source={require('../img/partner/Doctor.png')}></Image>
			        		</View>
			        		<Text style={styles.modularLeftText}>咨询医生</Text>
			        	</TouchableOpacity>
			        	<TouchableOpacity style={styles.modularRight}
			        		onPress={()=>{ 
								navigation.navigate("indexMonitoring")
							}}
			        	>
			        		<View style={styles.icon}>
			        			<Image style={styles.iconImages} resizeMode={'contain'} source={require('../img/partner/Monitor.png')}></Image>
			        		</View>
			        		<Text style={styles.modularLeftText}>监控指标</Text>
			        	</TouchableOpacity>
			        </View>
			        <View style={styles.modular}>
			       		<TouchableOpacity style={styles.modularLeft}>
			        		<View style={styles.icon}>
			        			<Image style={styles.iconImages} resizeMode={'contain'} source={require('../img/partner/Healthcare.png')}></Image>
			        		</View>
			        		<Text style={styles.modularLeftText}>养生保健</Text>
			        	</TouchableOpacity>
			        	<TouchableOpacity style={styles.modularRight}>
			        		
			        	</TouchableOpacity>
			        </View>
		        </View>
         	</ScrollView>
		);
	}
}
const styles = StyleSheet.create({
	modularLeftText: {
		fontSize: 18,textAlign: 'center',color: "#333333",height: "30%",marginTop:10,
	},
	iconImages:{
		height: "100%",width:"100%",alignSelf: 'center',
	},
	icon:{
		height: "55%",width:"100%",marginTop:20,
	},
	modularLeft:{
		flex:1,backgroundColor: 'white',marginRight:6,height: "100%",width:"100%",
	},
	modularRight:{
		flex:1,backgroundColor: 'white',marginLeft:6,height: "100%",width:"100%",
	},
	modular:{
		flexDirection:'row',height: 150,paddingLeft:12,paddingTop:12,paddingRight:12,
	},
	ScrollView:{
		backgroundColor: '#F5F5F5',
	},
});
